import request from '@/utils/request'

export function getDeviceList(params) {
  return request({
    url: '/app/device/page',
    method: 'get',
    params
  })
}

export function getTypeList() {
  return request({
    url: '/app/device/type/all',
    method: 'get',
  })
}

export function addDevice(data) {
  return request({
    url: '/app/device/add',
    method: 'post',
    data
  })
}

export function addDeviceType(data) {
  return request({
    url: '/app/device/type/add',
    method: 'post',
    data
  })
}

export function getStatusEcharts(params) {
  return request({
    url: '/app/device/status/echarts',
    method: 'get',
    params
  })
}
